package org.enhance.common.exception;

import org.enhance.common.constant.ResCodeConst;

public class EnhanceRuntimeException extends RuntimeException {

    private static final long serialVersionUID = -5985428146066366070L;

    private String status = ResCodeConst.BAD_REQUEST;
    private String errorCode;
    private String[] errorArgs;

    public EnhanceRuntimeException() {
        super();
    }

    public EnhanceRuntimeException(String s) {
        super(s);
    }
    public EnhanceRuntimeException(String s, Throwable throwable) {
        super(s, throwable);
    }


    public EnhanceRuntimeException(Throwable throwable) {
        super(throwable.getMessage(), throwable);
    }

    public String getStatus() {
        return this.status;
    }

    public void setStatus(String code) {
        this.status = code;
    }

    public void setStatus(int code) {
        this.status = String.valueOf(code);
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String[] getErrorArgs() {
        return errorArgs;
    }

    public void setErrorArgs(String[] errorArgs) {
        this.errorArgs = errorArgs;
    }

}
